// 视图组件
const view = {
  tabs: () => import('@/layouts/tabs'),
  blank: () => import('@/layouts/BlankView'),
  page: () => import('@/layouts/PageView')
}

// 路由组件注册
const routerMap = {
  login: {
    authority: '*',
    path: '/login',
    component: () => import('@/pages/login')
  },
  root: {
    path: '/',
    name: '首页',
    redirect: '/login',
    component: view.tabs
  },
  dashboard: {
    name: 'Dashboard',
    component: view.blank
  },
  projectList: {
    name: '项目列表',
    icon: 'projectList',
    level:'1',
    component: () => import('@/pages/project/projectList.vue'),
  },
  instrumentTool: {
    name: '项目列表',
    icon: 'instrumentTool',
    level:'1',
    component: () => import('@/pages/instrumentTool/instrumentTool.vue'),
  },
  undoList: {
    name: '待办中心',
    icon: 'undoList',
    level:'1',
    component: () => import('@/pages/undoList/undoList.vue'),
  },
  form: {
    name: '表单组件',
    icon: 'form',
    level:'2',
    component: view.page
  },
  basic: {
    path: 'basic',
    name: '基础表单',
    level:'2',
    component: () => import('@/pages/form/basic')
  },
  advance: {
    path: 'advance',
    name: '高级表单',
    level:'2',
    component: () => import('@/pages/form/advance')
  },
  list: {
    name: '表格组件',
    icon: 'table',
    level:'1',
    component: view.page
  },
  query: {
    path: 'query',
    name: '查询表格',
    level:'1',
    component: () => import('@/pages/list/query')
  },
  multiHeader: {
    path: 'multiHeader',
    name: '多级表头',
    level:'1',
    component: () => import('@/pages/list/multiHeader')
  },
  editTable: {
    path: 'editTable',
    name: '可编辑表格',
    level:'1',
    component: () => import('@/pages/list/editTable')
  },
  exception: {
    name: '异常页',
    icon: 'warning',
    component: view.blank
  },
  exp403: {
    authority: '*',
    name: 'exp403',
    path: '403',
    component: () => import('@/pages/exception/403')
  },
  exp404: {
    name: 'exp404',
    path: '404',
    component: () => import('@/pages/exception/404')
  },
  exp500: {
    name: 'exp500',
    path: '500',
    component: () => import('@/pages/exception/500')
  },
}
export default routerMap

